package cn.usain.controller;

import cn.usian.client.CategoryClient;
import cn.usian.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private CategoryClient categoryClient;
    @GetMapping("/page")
    public R findPage(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize){
        return categoryClient.findPage(page,pageSize);
    }
}
